package com.luotf.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Comments implements Comparable<Comments>{
	//id
    private Integer id;
    //评论人id
    private Integer tBlogerId;
    //被评论人id
    private Integer totBlogerId;
    //博客id	
    private Integer tBlogId;
    //创建时间
    private Date createTime;
    //评论正文
    private String commentsContent;
    //父级评论id
    private Integer parentCommId;
    
    //这条评论自所有子评论
    private List<Comments> childComment = new ArrayList<Comments>();
    //评论人
    private Bloger bloger;
    //被评论人
    private Bloger tobloger;
    

    public List<Comments> getChildComment() {
		return childComment;
	}

	public void setChildComment(List<Comments> childComment) {
		this.childComment = childComment;
	}

	public Integer getParentCommId() {
		return parentCommId;
	}

	public void setParentCommId(Integer parentCommId) {
		this.parentCommId = parentCommId;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer gettBlogerId() {
        return tBlogerId;
    }

    public void settBlogerId(Integer tBlogerId) {
        this.tBlogerId = tBlogerId;
    }
    
    
    
    
    
    
	public Integer getTotBlogerId() {
		return totBlogerId;
	}

	public void setTotBlogerId(Integer totBlogerId) {
		this.totBlogerId = totBlogerId;
	}

	public Bloger getTobloger() {
		return tobloger;
	}

	public void setTobloger(Bloger tobloger) {
		this.tobloger = tobloger;
	}

	public Comments(Integer id, Integer tBlogerId, Integer totBlogerId, Integer tBlogId, Date createTime,
			String commentsContent, Integer parentCommId, List<Comments> childComment, Bloger bloger, Bloger tobloger) {
		this.id = id;
		this.tBlogerId = tBlogerId;
		this.totBlogerId = totBlogerId;
		this.tBlogId = tBlogId;
		this.createTime = createTime;
		this.commentsContent = commentsContent;
		this.parentCommId = parentCommId;
		this.childComment = childComment;
		this.bloger = bloger;
		this.tobloger = tobloger;
	}

	public Comments() {
    	
    }
    

	public Integer gettBlogId() {
        return tBlogId;
    }

    public void settBlogId(Integer tBlogId) {
        this.tBlogId = tBlogId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCommentsContent() {
        return commentsContent;
    }

    public void setCommentsContent(String commentsContent) {
        this.commentsContent = commentsContent;
    }

	public Bloger getBloger() {
		return bloger;
	}

	public void setBloger(Bloger bloger) {
		this.bloger = bloger;
	}

	@Override
	public String toString() {
		return "Comments [id=" + id + ", tBlogerId=" + tBlogerId + ", totBlogerId=" + totBlogerId + ", tBlogId="
				+ tBlogId + ", createTime=" + createTime + ", commentsContent=" + commentsContent + ", parentCommId="
				+ parentCommId + ", childComment=" + childComment + ", bloger=" + bloger + ", tobloger=" + tobloger
				+ "]";
	}

	@Override
	public int compareTo(Comments o) {
		return this.createTime.compareTo(o.getCreateTime());
	}
    
    
}